package aop05;

import aop03.SomeException;

public class UserServiceImpl implements UserService {
    int id;
    String name;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void regist() throws SomeException {
        System.out.println("注册方法执行");
        throw new SomeException("注册方法 抛异常");
    }

    @Override
    public void login() {
        System.out.println("登录方法执行");
    }

    @Override
    public int add(int i, int j) {
        System.out.println("add方法执行");
        return i+j;
    }

    @Override
    public void doSome() {
        System.out.println("UserService  doSome方法执行");
    }

    @Override
    public void doOther() {
        System.out.println("UserService doOther方法执行");
    }

    @Override
    public void doEveryOne(String name) {
        System.out.println("UserService doEveryOne方法执行 "+name);
    }
}
